package com.za.wbw.web.shop.action;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.za.wbw.model.shop.OrderInfo;
import com.za.wbw.service.shop.OrderService;
import com.za.wbw.util.BaseAction;

public class OrderAction extends BaseAction {
	private static final long serialVersionUID = 1L;
	private OrderService orderService;
	// 查询订单列表
	public String queryOrderList() throws Exception{
		Map<String, Object> pars = new HashMap<String, Object>();
		pars.put("start", 0);
		List<OrderInfo> orderList = getOrderService().queryOrderPage(pars);
		request.setAttribute("order_list", orderList);
		int count = getOrderService().queryOrderCount(pars);
		request.setAttribute("order_count", count);
		return SUCCESS;
	}
	// 查询订单信息
	public String queryOrderInfo() throws Exception{
		return SUCCESS;
	}
	// ----------------------------------------
	public OrderService getOrderService() {
		return orderService;
	}
	public void setOrderService(OrderService orderService) {
		this.orderService = orderService;
	}
}
